/**
 * @description 题目难度下拉框选项配置
 */
export const OjSubjectDifficultOptions = [
    {
        value: 1,
        label: '简单',
    },
    {
        value: 2,
        label: '中等',
    },
    {
        value: 3,
        label: '困难',
    }
];

/**
 * @description 题目状态下拉框选项配置
 */
export const OjSubjectStatusOptions = [
    {
        value: 1,
        label: '未开始',
    },
    {
        value: 2,
        label: '尝试过',
    },
    {
        value: 3,
        label: '已解决',
    }
];

/**
 * @description 题目难度枚举
 */
export declare type ItemType = {
    code: number,
    description: string
}
export declare type EnumItemType = {
    [key: string]:ItemType
}
export const OjSubjectDifficultEnum: EnumItemType = {
    SIMPLE: {
        code: 1,
        description: "简单"
    },
    MEDIUM: {
        code: 2,
        description: "中等"
    },
    HARD: {
        code: 3,
        description: "困难"
    }
}

export function getOjSubjectDifficultEnumByCode(code: number):ItemType {
    for (const key in OjSubjectDifficultEnum) {
        const item = OjSubjectDifficultEnum[key as unknown as never] as unknown as ItemType;
        if (item.code === code) return item;
    }
    return null as any;
}

/**
 * @description 题目状态文字图标枚举
 */
export enum OjSubjectStatusTextIconEnum {
    NOT_STARTED = "💤",
    RESOLVED = "✅",
    ATTEMPTED = "✴️"
}
